<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2020/10/18
 * Time: 3:23 PM
 */
namespace app\admin\controller;


use app\admin\logic\LeaveLogic;
use app\BaseController;

use think\App;
use think\facade\Request;

class Leave extends BaseController
{

    public function __construct()
    {
//        logend(config('user'));
//        if(config('user')['position'] != \app\model\User::SYS_ADMIN)   fail('暂无权限');
    }

    /*
     * 列表
     */
    public function index()
    {
        $logic = new LeaveLogic();
        success($logic->getList());
    }

    public function pass()
    {
        $logic = new LeaveLogic();
        success($logic->pass());
    }
    public function download()
    {
        $logic = new LeaveLogic();
        success($logic->download());
    }
}